import {
  createRouter,
  createWebHashHistory,
} from 'vue-router'
import IconDemo from '@/views/IconDemo.vue'
import DrawingPanelDemo from '@/views/DrawingPanelDemo.vue'
import GoodsCardDemo from '@/views/GoodsCardDemo.vue'
import GoodsListDemo from '@/views/GoodsListDemo.vue'
import SearchBarDemo from '@/views/SearchBarDemo.vue'
const routes = [
  {
    name: 'draw',
    path: '/draw',
    component: DrawingPanelDemo
  },
  {
    name: 'icons',
    path: '/icons',
    component: IconDemo
  },
  {
    name: 'goods-card',
    path: '/goods-card',
    component: GoodsCardDemo
  },
  {
    name: 'goods-list',
    path: '/goods-list',
    component: GoodsListDemo
  },
  {
    name: 'search-bar',
    path: '/search-bar',
    component: SearchBarDemo
  }
]

// 创建路由对象
const router = createRouter({
  history: createWebHashHistory(),
  routes
})
export default router;
